feat(inbox): filter reports by priority#2176
Open
oliverb123 wants to merge 2 commits into
Open
Conversation
Adds a Priority section (P0-P4) to the inbox filter popover, mirroring the existing source-product filter pattern. Selections are persisted alongside the other filter prefs and sent to the new `priority` query parameter on the signals reports list endpoint. Backend support shipped in PostHog/posthog#58784. Generated-By: PostHog Code Task-Id: a20149cc-595e-49b3-b2a9-e12641b73dbc
Contributor
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
apps/code/src/renderer/features/inbox/utils/filterReports.test.ts:158-172
The three `buildPriorityFilterParam` cases are independent input→output pairs on the same function, making them a textbook candidate for `it.each`. The team's preference is parameterised tests, and the current structure repeats the same pattern three times.
```suggestion
describe("buildPriorityFilterParam", () => {
it.each([
{ input: [], expected: undefined },
{ input: ["P0", "P1", "P2"], expected: "P0,P1,P2" },
{ input: ["P0", "P1", "P0", "P2", "P1"], expected: "P0,P1,P2" },
] as const)("buildPriorityFilterParam($input) → $expected", ({ input, expected }) => {
expect(buildPriorityFilterParam(input as SignalReportPriority[])).toBe(expected);
});
});
```
Reviews (1): Last reviewed commit: "feat(inbox): filter reports by priority" | Re-trigger Greptile |
Addresses Greptile review feedback on #2176. Generated-By: PostHog Code Task-Id: a20149cc-595e-49b3-b2a9-e12641b73dbc
Twixes
approved these changes
May 18, 2026
Member
Twixes
left a comment
There was a problem hiding this comment.
Think we'll have to split that filter into more dropdowns, but it's fine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
resetFilters(deep-link safe).priorityquery parameter onGET /api/projects/<team_id>/signals/reports/(backend shipped in PostHog/posthog#58784). Comma-separatedP0..P4.Test plan
pnpm --filter code typecheckpassespnpm --filter code test— all 1233 tests pass; 13 ininboxSignalsFilterStore.test.ts, 20 infilterReports.test.ts&priority=P0; toggle P1 →&priority=P0,P1; clearing all removes the param; selection persists across reloadresetFiltersclears the filter and the report is visible